package day13_Io.demo02_FileOutPutStream;

import java.io.FileInputStream;
//方法1的读取全部数据
public class Demo06_FileInputStream {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("E:\\csw\\Demo\\csw1\\csw1.txt");
//        int read1 = fis.read();
//        System.out.println(read1);
//        int read2 = fis.read();
//        System.out.println(read2);
//        int read3 = fis.read();
//        System.out.println(read3);
//        int read4 = fis.read();
//        System.out.println(read4);
        //结果为 97 98 99 -1
        int i;
        while ((i=fis.read())!=-1){
            System.out.println(i);
        }
        fis.close();
    }
}
